Dear Visual Basic,

Kinja'd!!! "Arch Duke Maxyenko, Shit Talk Extraordinaire" (arch-duke-maxyenko)
08/28/2013 at 22:59 • Filed to: None

Kinja'd!!!2 Kinja'd!!! 17
Kinja'd!!!

DISCUSSION (17)


Kinja'd!!! Casper > Arch Duke Maxyenko, Shit Talk Extraordinaire
08/28/2013 at 23:01

Kinja'd!!!0

Why the VB hate? VB has always been friendly enough to me... feel free to hate on Java all you want.


Kinja'd!!! Arch Duke Maxyenko, Shit Talk Extraordinaire > Casper
08/28/2013 at 23:02

Kinja'd!!!0

I have code and it works. I copy and paste the code and it does not work.


Kinja'd!!! Casper > Arch Duke Maxyenko, Shit Talk Extraordinaire
08/28/2013 at 23:03

Kinja'd!!!0

Then you are missing a tag or something in your copy (or duplicating function/sub names). I'm quite sure the compiler isn't trolling you... well 90% sure.


Kinja'd!!! Arch Duke Maxyenko, Shit Talk Extraordinaire > Casper
08/28/2013 at 23:06

Kinja'd!!!0

I copy and paste the teacher's code, and would you look at that, a whole lot of

Kinja'd!!!


Kinja'd!!! Casper > Arch Duke Maxyenko, Shit Talk Extraordinaire
08/28/2013 at 23:07

Kinja'd!!!0

I'm assuming this is VB .NET, correct? What is the error it gives?


Kinja'd!!! Arch Duke Maxyenko, Shit Talk Extraordinaire > Casper
08/28/2013 at 23:10

Kinja'd!!!0

Kinja'd!!!


Kinja'd!!! Casper > Arch Duke Maxyenko, Shit Talk Extraordinaire
08/28/2013 at 23:12

Kinja'd!!!0

Oh wow, you guys are doing old school IDE/VBA stuff. Do you have a control on the form/sheet named lblCellAddress? I'm guessing it's firing and that's how you are getting to that error correct?

Edit: Does VBA have the .Text property off of the label control like VB.NET does? If so, you might try that. Without an error I'm not exactly sure what it's unhappy about.


Kinja'd!!! Arch Duke Maxyenko, Shit Talk Extraordinaire > Casper
08/28/2013 at 23:15

Kinja'd!!!0

A label in the Excel spread sheet that is supposed to say hello world.


Kinja'd!!! Pamplemousse > Arch Duke Maxyenko, Shit Talk Extraordinaire
08/28/2013 at 23:15

Kinja'd!!!0

God I feel your pain man. Why the fuck are you guys doing classic Visual Basic?
Either way, post both your source and the teacher's and I'll help you out.


Kinja'd!!! Casper > Arch Duke Maxyenko, Shit Talk Extraordinaire
08/28/2013 at 23:17

Kinja'd!!!1

Oh, ha! You have a typo in the name of the label. Hard to read that fuzzy/small. Add a d.


Kinja'd!!! Arch Duke Maxyenko, Shit Talk Extraordinaire > Pamplemousse
08/28/2013 at 23:20

Kinja'd!!!0

INF 120 Business Programming, why I have no fucking clue I'm in Mechanical Engineering. This is my senior year.


Kinja'd!!! Arch Duke Maxyenko, Shit Talk Extraordinaire > Casper
08/28/2013 at 23:23

Kinja'd!!!0

Kinja'd!!!

Private Sub lblCellAdress_Click()

lblCellAddress.Caption = "Hello World"

lblCellAddress.Font = "Times New Roman"

lblCellAddress.BackColor = vbYellow

lblCellAddress.ForeColor = vbRed

End Sub

Shit is copied directly from the teacher, I did exactly what he said:

2. In step 2 on page 22, add a label across the following range (C5:D6), (Steps: Office 2003 Click the View menu, point to Toolbars, click Visual Basic on the toolbars menu, click on the hammer and wrench icon on the floating Visual Basic toolbar to get the Control Toolbox, click on the label control in the toolbox; Office 2007/2010 Click the Developer tab, click the Insert button (hammer and wrench icon) on the ribbon to display the control toolbox. Click on a label icon in the toolbox (capital A) in Active X Controls Toolbox); then click in the upper left-hand corner of cell C5 and draw the control on the spreadsheet. Set the following properties of the label (lblCellAddress) using the Click event of the label. Put the following code statements in the Click event of the label (lblCellAddress) using the code window as shown below: lblCellAddress.Caption = "Hello World" lblCellAddress.Font = "Times New Roman" lblCellAddress.BackColor = vbYellow lblCellAddress.ForeColor = vbRed Copy and Paste the code and comments for lblCellAddress_Click event for challenge2 into cell A10.


Kinja'd!!! Arch Duke Maxyenko, Shit Talk Extraordinaire > Casper
08/28/2013 at 23:24

Kinja'd!!!0

thanks


Kinja'd!!! Casper > Arch Duke Maxyenko, Shit Talk Extraordinaire
08/28/2013 at 23:24

Kinja'd!!!0

You did all that right, but you named the label lblCellAdress rather than lblCellAddress like his code references. Just click the control and rename it or delete it and make a new one with the right name.


Kinja'd!!! NaturallyAspirated > Arch Duke Maxyenko, Shit Talk Extraordinaire
08/29/2013 at 12:47

Kinja'd!!!0

I agree. Try C# instead.


Kinja'd!!! Arch Duke Maxyenko, Shit Talk Extraordinaire > NaturallyAspirated
08/29/2013 at 13:34

Kinja'd!!!0

Yeah I'm going to try to switch from business programming to elementary programming.


Kinja'd!!! NaturallyAspirated > Arch Duke Maxyenko, Shit Talk Extraordinaire
08/29/2013 at 13:39

Kinja'd!!!0

Note that my post was somewhat tongue-in-cheek. Every programming language has it's foibles. My personal preference is for C# but I know others who are perfectly happy with VB, Python, etc.